<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.util.collection.model.SeqView</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.util.collection.model.SeqView";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.util.collection.model.SeqView.html" class="symbol">tango.util.collection.model.SeqView</a></h1>
  
<dl>
<dt class="decl">interface <a class="symbol _interface" name="SeqView" href="./htmlsrc/tango.util.collection.model.SeqView.html#L36" kind="interface" beg="36" end="195">SeqView</a><span class="tparams">(T)</span> : View!(T); <a title="Permalink to this symbol" href="#SeqView" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L36">#</a></dt>
<dd class="ddef">
<div class="summary">Seqs are indexed, sequentially ordered collections.
 Indices are always in the range 0 .. size() -1. All accesses by index
 are checked, raising exceptions if the index falls out of range.
 <P>
 The elements() enumeration for all seqs is guaranteed to be
 traversed (via nextElement) in sequential order.</div>
<p class="sec_header">Author:</p>Doug Lea
 @version 0.93
<p class="bl"/>
 <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.
<dl>
<dt class="decl">T <a class="symbol _function" name="SeqView.get" href="./htmlsrc/tango.util.collection.model.SeqView.html#L47" kind="function" beg="47" end="47">get</a><span class="params">(int <em>index</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.get" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L47">#</a></dt>
<dd class="ddef">
<div class="summary">Return the element at the indicated index
 @param index</div>
<p class="sec_header">Returns:</p>the element at the index
<p class="sec_header">Throws:</p>NoSuchElementException if index is not in range 0..size()-1</dd>
<dt class="decl">T <a class="symbol _function" name="SeqView.head" href="./htmlsrc/tango.util.collection.model.SeqView.html#L57" kind="function" beg="57" end="57">head</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.head" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L57">#</a></dt>
<dd class="ddef">
<div class="summary">Return the first element, if it exists.
 Behaviorally equivalent to at(0)</div>
<p class="sec_header">Throws:</p>NoSuchElementException if isEmpty</dd>
<dt class="decl">T <a class="symbol _function" name="SeqView.tail" href="./htmlsrc/tango.util.collection.model.SeqView.html#L66" kind="function" beg="66" end="66">tail</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.tail" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L66">#</a></dt>
<dd class="ddef">
<div class="summary">Return the last element, if it exists.
 Behaviorally equivalent to at(size()-1)</div>
<p class="sec_header">Throws:</p>NoSuchElementException if isEmpty</dd>
<dt class="decl">int <a class="symbol _function" name="SeqView.first" href="./htmlsrc/tango.util.collection.model.SeqView.html#L87" kind="function" beg="87" end="87">first</a><span class="params">(T <em>element</em>, int <em>startingIndex</em> = 0)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.first" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L87">#</a></dt>
<dd class="ddef">
<div class="summary">Report the index of leftmost occurrence of an element from a 
 given starting point, or -1 if there is no such index.
 @param element the element to look for
 @param startingIndex the index to start looking from. The startingIndex
 need not be a valid index. If less than zero it is treated as 0.
 If greater than or equal to size(), the result will always be -1.</div>
<p class="sec_header">Returns:</p>index such that
 <PRE> 
 let int si = max(0, startingIndex) in
  index == -1 &amp;&amp;
   foreach (int i in si .. size()-1) !at(index).equals(element)
  ||
  at(index).equals(element) &amp;&amp;
   foreach (int i in si .. index-1) !at(index).equals(element)
 </PRE></dd>
<dt class="decl">int <a class="symbol _function" name="SeqView.last" href="./htmlsrc/tango.util.collection.model.SeqView.html#L108" kind="function" beg="108" end="108">last</a><span class="params">(T <em>element</em>, int <em>startingIndex</em> = 0)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.last" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L108">#</a></dt>
<dd class="ddef">
<div class="summary">Report the index of righttmost occurrence of an element from a 
 given starting point, or -1 if there is no such index.
 @param element the element to look for
 @param startingIndex the index to start looking from. The startingIndex
 need not be a valid index. If less than zero the result
 will always be -1.
 If greater than or equal to size(), it is treated as size()-1.</div>
<p class="sec_header">Returns:</p>index such that
 <PRE> 
 let int si = min(size()-1, startingIndex) in
  index == -1 &amp;&amp;
   foreach (int i in 0 .. si) !at(index).equals(element)
  ||
  at(index).equals(element) &amp;&amp;
   foreach (int i in index+1 .. si) !at(index).equals(element)
 </PRE></dd>
<dt class="decl">SeqView <a class="symbol _function" name="SeqView.subset" href="./htmlsrc/tango.util.collection.model.SeqView.html#L125" kind="function" beg="125" end="125">subset</a><span class="params">(int <em>index</em>, int <em>length</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.subset" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L125">#</a></dt>
<dd class="ddef">
<div class="summary">Construct a new SeqView that is a clone of self except
 that it does not contain the elements before index or
 after index+length. If length is less than or equal to zero,
 return an empty SeqView.
 @param index of the element that will be the 0th index in new SeqView
 @param length the number of elements in the new SeqView</div>
<p class="sec_header">Returns:</p>new seq such that
 <PRE>
 s.size() == max(0, length) &amp;&amp;
 foreach (int i in 0 .. s.size()-1) s.at(i).equals(at(i+index)); 
 </PRE>
<p class="sec_header">Throws:</p>NoSuchElementException if index is not in range 0..size()-1</dd>
<dt class="decl">SeqView <a class="symbol _function" name="SeqView.opSlice" href="./htmlsrc/tango.util.collection.model.SeqView.html#L141" kind="function" beg="141" end="141">opSlice</a><span class="params">(int <em>begin</em>, int <em>end</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SeqView.opSlice" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.model.SeqView.html#L141">#</a></dt>
<dd class="ddef">
<div class="summary">Construct a new SeqView that is a clone of self except
 that it does not contain the elements before begin or
 after end-1. If length is less than or equal to zero,
 return an empty SeqView.
 @param index of the element that will be the 0th index in new SeqView
 @param index of the last element in the SeqView plus 1</div>
<p class="sec_header">Returns:</p>new seq such that
 <PRE>
 s.size() == max(0, length) &amp;&amp;
 foreach (int i in 0 .. s.size()-1) s.at(i).equals(at(i+index)); 
 </PRE>
<p class="sec_header">Throws:</p>NoSuchElementException if index is not in range 0..size()-1</dd></dl></dd></dl>
</div>
<div id="footer">
  <p></p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:09 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>